Remove VIRQ_MISDIRECT altogether.
/*
* Port 0 is the fallback port for VIRQs that haven't been explicitly
- * bound yet. The exception is the 'misdirect VIRQ', which is permanently
- * bound to port 0.
+ * bound yet.
*/
if ( ((port = ed->virq_to_evtchn[virq]) != 0) ||
- (virq == VIRQ_MISDIRECT) ||
((port = get_free_port(ed)) < 0) )
goto out;
chn1 = d1->event_channel;
- /* NB. Port 0 is special (VIRQ_MISDIRECT). Never let it be closed. */
- if ( (port1 <= 0) || (port1 >= d1->max_event_channel) )
+ if ( (port1 < 0) || (port1 >= d1->max_event_channel) )
{
rc = -EINVAL;
goto out;
switch ( chn1[port1].state )
{
case ECS_FREE:
+ case ECS_RESERVED:
rc = -EINVAL;
goto out;
switch ( chn[port].state )
{
case ECS_FREE:
+ case ECS_RESERVED:
status->status = EVTCHNSTAT_closed;
break;
case ECS_UNBOUND:
/* Call get_free_port to initialize d->event_channel */
if ( get_free_port(d->exec_domain[0]) != 0 )
return -EINVAL;
- d->event_channel[0].state = ECS_VIRQ;
- d->event_channel[0].u.virq = VIRQ_MISDIRECT;
+ d->event_channel[0].state = ECS_RESERVED;
return 0;
}
*
* Virtual interrupts that a guest OS may receive from Xen.
*/
-#define VIRQ_MISDIRECT 0 /* Catch-all interrupt for unbound VIRQs. */
-#define VIRQ_TIMER 1 /* Timebase update, and/or requested timeout. */
-#define VIRQ_DEBUG 2 /* Request guest to dump debug info. */
-#define VIRQ_CONSOLE 3 /* (DOM0) bytes received on emergency console. */
-#define VIRQ_DOM_EXC 4 /* (DOM0) Exceptional event for some domain. */
-#define VIRQ_PARITY_ERR 5 /* (DOM0) NMI parity error. */
-#define VIRQ_IO_ERR 6 /* (DOM0) NMI I/O error. */
+#define VIRQ_TIMER 0 /* Timebase update, and/or requested timeout. */
+#define VIRQ_DEBUG 1 /* Request guest to dump debug info. */
+#define VIRQ_CONSOLE 2 /* (DOM0) bytes received on emergency console. */
+#define VIRQ_DOM_EXC 3 /* (DOM0) Exceptional event for some domain. */
+#define VIRQ_PARITY_ERR 4 /* (DOM0) NMI parity error. */
+#define VIRQ_IO_ERR 5 /* (DOM0) NMI I/O error. */
#define NR_VIRQS 7
/*
typedef struct event_channel_st
{
#define ECS_FREE 0 /* Channel is available for use. */
-#define ECS_UNBOUND 1 /* Channel is waiting to bind to a remote domain. */
-#define ECS_INTERDOMAIN 2 /* Channel is bound to another domain. */
-#define ECS_PIRQ 3 /* Channel is bound to a physical IRQ line. */
-#define ECS_VIRQ 4 /* Channel is bound to a virtual IRQ line. */
-#define ECS_IPI 5 /* Channel is bound to a virtual IPI line. */
+#define ECS_RESERVED 1 /* Channel is reserved. */
+#define ECS_UNBOUND 2 /* Channel is waiting to bind to a remote domain. */
+#define ECS_INTERDOMAIN 3 /* Channel is bound to another domain. */
+#define ECS_PIRQ 4 /* Channel is bound to a physical IRQ line. */
+#define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. */
+#define ECS_IPI 6 /* Channel is bound to a virtual IPI line. */
u16 state;
union {
struct {